<?php
	// the next two lines for testing purposes.
	require('functions.php');
	require('configure.php');
	function process(&$req){
		switch($req['do']){
			//problem related cases
			case 'apro':
			break;
			case 'ipro':
			break;
			case 'epro':
				editProblem(1,1);
			break;
			case 'upro':
			break;
			case 'rpro':
			break;
			case 'pro':
			break;
			case 'spro':
				break;problems
			default:
				$req['do'] = 'spro';
				process(&$req);
			break;
			//end of problem related cases
		}
		return $html;
	}

	function editProblem($request, $id){
		/*
		 *
		 * Function by Ibraim Abdel Fattah Mohamed
		 * E-mail: bingorabbit@gmail.com
		 * Website: http://bingorabbit.com
		 * To edit a problem
		 * @return HTML render for the form with default values of problem's data
		 *
		 */
		if($request){
			$query = "SELECT * FROM problems 
					WHERE id = $id";
			$result = mysql_fetch_array(query($query, 0));
			return render("editproblem", $result);
		} else {
			// Throw an error
		}
		
	}
	editProblem(1,1);
?>